//1. 引入 react 和 reactDOM
import React from 'react';
import ReactDOM from 'react-dom';

//测试 redux/store.js
import store from './redux/store';


//2. 创建虚拟 DOM 对象  http://atguigu.com/search?q=html5#logo
// let vDOM = <h1>Hello React 脚手架 你好</h1>;
//导入 App 组件
import App from './App';
import {BrowserRouter, HashRouter} from 'react-router-dom';// hash

//3. 渲染虚拟 DOM 对象
ReactDOM.render(<HashRouter><App /></HashRouter>, document.querySelector("#root"));

store.subscribe(() => {   
    ReactDOM.render(<HashRouter><App /></HashRouter>, document.querySelector("#root"));
});